/**
 * Created by 80935_000 on 2016/3/4.
 */


require(["jquery"], function ($) {


    $(function () {
        //右边内容宽度
        var windowWidth = $(window).width();
        var windowHeight = $(window).height();
        var defaultRightContentHeight = $("#rightContent").height();
        //如果右边内容的默认高度小于浏览器高度，那就让其等于浏览器高度
        if (defaultRightContentHeight < windowHeight) {
            $("#rightContent").height(windowHeight);
        }
        var rightContentHeight = $("#rightContent").height();
        //设置左边高度
        $("#leftContent").height(rightContentHeight);
        var leftContentWidth = $("#leftContent").width();
        //$("#rightContent").width(windowWidth-leftContentWidth);
        //表格高度
        var rightTopHeight = $("#rightTop").height();
        var rightTitleHeight = $("#rightTitle").height();
        $("#tableBox").height(rightContentHeight - rightTopHeight - rightTitleHeight - 80);
        window.onresize = function () {
            //右边内容宽度
            var windowWidth = $(window).width();
            var windowHeight = $(window).height();
            var defaultRightContentHeight = $("#rightContent").height();
            //如果右边内容的默认高度小于浏览器高度，那就让其等于浏览器高度
            if (defaultRightContentHeight < windowHeight) {
                $("#rightContent").height(windowHeight);
            }
            var rightContentHeight = $("#rightContent").height();
            //设置左边高度
            $("#leftContent").height(rightContentHeight);
            var leftContentWidth = $("#leftContent").width();
            //$("#rightContent").width(windowWidth-leftContentWidth);
            //表格高度
            var rightTopHeight = $("#rightTop").height();
            var rightTitleHeight = $("#rightTitle").height();
            $("#tableBox").height(rightContentHeight - rightTopHeight - rightTitleHeight - 80);
        };
    });
});